3.2.63 \(\int \frac {\sec (c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx\) [163]

Optimal. Leaf size=60 \[ \frac {\tanh ^{-1}\left (\frac {\sqrt {a+a \sin (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}-\frac {1}{d \sqrt {a+a \sin (c+d x)}} \]

[Out]

1/2*arctanh(1/2*(a+a*sin(d*x+c))^(1/2)*2^(1/2)/a^(1/2))/d*2^(1/2)/a^(1/2)-1/d/(a+a*sin(d*x+c))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2746, 53, 65, 212} \begin {gather*} \frac {\tanh ^{-1}\left (\frac {\sqrt {a \sin (c+d x)+a}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}-\frac {1}{d \sqrt {a \sin (c+d x)+a}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]/Sqrt[a + a*Sin[c + d*x]],x]

[Out]

ArcTanh[Sqrt[a + a*Sin[c + d*x]]/(Sqrt[2]*Sqrt[a])]/(Sqrt[2]*Sqrt[a]*d) - 1/(d*Sqrt[a + a*Sin[c + d*x]])

Rule 53

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^(n + 1
)/((b*c - a*d)*(m + 1))), x] - Dist[d*((m + n + 2)/((b*c - a*d)*(m + 1))), Int[(a + b*x)^(m + 1)*(c + d*x)^n,
x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && LtQ[m, -1] &&  !(LtQ[n, -1] && (EqQ[a, 0] || (NeQ[
c, 0] && LtQ[m - n, 0] && IntegerQ[n]))) && IntLinearQ[a, b, c, d, m, n, x]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2746

Int[cos[(e_.) + (f_.)*(x_)]^(p_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(b^p*f), S
ubst[Int[(a + x)^(m + (p - 1)/2)*(a - x)^((p - 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x]
&& IntegerQ[(p - 1)/2] && EqQ[a^2 - b^2, 0] && (GeQ[p, -1] ||  !IntegerQ[m + 1/2])

Rubi steps

\begin {align*} \int \frac {\sec (c+d x)}{\sqrt {a+a \sin (c+d x)}} \, dx &=\frac {a \text {Subst}\left (\int \frac {1}{(a-x) (a+x)^{3/2}} \, dx,x,a \sin (c+d x)\right )}{d}\\ &=-\frac {1}{d \sqrt {a+a \sin (c+d x)}}+\frac {\text {Subst}\left (\int \frac {1}{(a-x) \sqrt {a+x}} \, dx,x,a \sin (c+d x)\right )}{2 d}\\ &=-\frac {1}{d \sqrt {a+a \sin (c+d x)}}+\frac {\text {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+a \sin (c+d x)}\right )}{d}\\ &=\frac {\tanh ^{-1}\left (\frac {\sqrt {a+a \sin (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}-\frac {1}{d \sqrt {a+a \sin (c+d x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
time = 0.03, size = 39, normalized size = 0.65 \begin {gather*} -\frac {\, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};\frac {1}{2} (1+\sin (c+d x))\right )}{d \sqrt {a+a \sin (c+d x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]/Sqrt[a + a*Sin[c + d*x]],x]

[Out]

-(Hypergeometric2F1[-1/2, 1, 1/2, (1 + Sin[c + d*x])/2]/(d*Sqrt[a + a*Sin[c + d*x]]))

________________________________________________________________________________________

Maple [A]
time = 0.26, size = 54, normalized size = 0.90

method result size
default \(-\frac {2 a \left (\frac {1}{2 a \sqrt {a +a \sin \left (d x +c \right )}}-\frac {\sqrt {2}\, \arctanh \left (\frac {\sqrt {a +a \sin \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{4 a^{\frac {3}{2}}}\right )}{d}\) \(54\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)/(a+a*sin(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-2*a*(1/2/a/(a+a*sin(d*x+c))^(1/2)-1/4/a^(3/2)*2^(1/2)*arctanh(1/2*(a+a*sin(d*x+c))^(1/2)*2^(1/2)/a^(1/2)))/d

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 78, normalized size = 1.30 \begin {gather*} -\frac {\sqrt {2} \sqrt {a} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {a \sin \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {a \sin \left (d x + c\right ) + a}}\right ) + \frac {4 \, a}{\sqrt {a \sin \left (d x + c\right ) + a}}}{4 \, a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+a*sin(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

-1/4*(sqrt(2)*sqrt(a)*log(-(sqrt(2)*sqrt(a) - sqrt(a*sin(d*x + c) + a))/(sqrt(2)*sqrt(a) + sqrt(a*sin(d*x + c)
 + a))) + 4*a/sqrt(a*sin(d*x + c) + a))/(a*d)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 90, normalized size = 1.50 \begin {gather*} \frac {\frac {\sqrt {2} {\left (a \sin \left (d x + c\right ) + a\right )} \log \left (-\frac {\frac {2 \, \sqrt {2} \sqrt {a \sin \left (d x + c\right ) + a}}{\sqrt {a}} + \sin \left (d x + c\right ) + 3}{\sin \left (d x + c\right ) - 1}\right )}{\sqrt {a}} - 4 \, \sqrt {a \sin \left (d x + c\right ) + a}}{4 \, {\left (a d \sin \left (d x + c\right ) + a d\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+a*sin(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

1/4*(sqrt(2)*(a*sin(d*x + c) + a)*log(-(2*sqrt(2)*sqrt(a*sin(d*x + c) + a)/sqrt(a) + sin(d*x + c) + 3)/(sin(d*
x + c) - 1))/sqrt(a) - 4*sqrt(a*sin(d*x + c) + a))/(a*d*sin(d*x + c) + a*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sec {\left (c + d x \right )}}{\sqrt {a \left (\sin {\left (c + d x \right )} + 1\right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+a*sin(d*x+c))**(1/2),x)

[Out]

Integral(sec(c + d*x)/sqrt(a*(sin(c + d*x) + 1)), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 123 vs. \(2 (50) = 100\).
time = 4.74, size = 123, normalized size = 2.05 \begin {gather*} \frac {\sqrt {a} {\left (\frac {\sqrt {2} \log \left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} - \frac {\sqrt {2} \log \left (-\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}{a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )} - \frac {2 \, \sqrt {2}}{a \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}\right )}}{4 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+a*sin(d*x+c))^(1/2),x, algorithm="giac")

[Out]

1/4*sqrt(a)*(sqrt(2)*log(cos(-1/4*pi + 1/2*d*x + 1/2*c) + 1)/(a*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))) - sqrt(2)
*log(-cos(-1/4*pi + 1/2*d*x + 1/2*c) + 1)/(a*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))) - 2*sqrt(2)/(a*cos(-1/4*pi +
 1/2*d*x + 1/2*c)*sgn(cos(-1/4*pi + 1/2*d*x + 1/2*c))))/d

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {1}{\cos \left (c+d\,x\right )\,\sqrt {a+a\,\sin \left (c+d\,x\right )}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(cos(c + d*x)*(a + a*sin(c + d*x))^(1/2)),x)

[Out]

int(1/(cos(c + d*x)*(a + a*sin(c + d*x))^(1/2)), x)

________________________________________________________________________________________